﻿CREATE proc thuan_qtdanhmucnhomchuongtrinhthem  
@DienGiai nvarchar(255) ,
@ThuTuSapXep int 
as  
if exists(select * from DanhMuc_NhomChuongTrinh Where DienGiai =@DienGiai)  
begin  
select ErrCode=0  
end  
else  
begin  
insert into DanhMuc_NhomChuongTrinh (DienGiai,ThuTuSapXep)values(@DienGiai,@ThuTuSapXep)  
select ErrCode=1  
end  